package com.camp.android.trip.n.track.menu;

import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.camp.android.trip.n.track.R;

public class MenuPastFragment extends ListFragment  {

	private PastListAdapter adapter = null;
	
	public MenuPastFragment() {
		
	}
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.i("Tag","Created past fragment");
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
    	
    	View rootView = inflater.inflate(R.layout.fragment_menu_past, container, false);
        Log.i("tag","past fragment view created");
        adapter = new PastListAdapter(inflater, getActivity());
        
        return rootView;
    }
    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
    	// TODO Auto-generated method stub
    	super.onActivityCreated(savedInstanceState); 
    	//Log.i("TAG","ManuUpcomingFragment onActivityCreated");
    	//ListAdapter adapter = new UpcomingListAdapter(getActivity());
    	setListAdapter(adapter);
    	
    	//getListView().setOnItemClickListener(this);
//        getListView().setAdapter(adapter);
    }
    
    @Override
    public void onListItemClick(ListView l, View v, int position, long id) {
    	// TODO Auto-generated method stub
    	//super.onListItemClick(l, v, position, id);
    	Log.i("TAG","Clicked on position "+position);
    }

	
}
